import React, { Component } from "react";

import moment from "moment";
import "moment/locale/zh-cn";

import styles from "./style.less";
import { Button } from "antd";

class index extends Component {
  constructor(props) {
    super(props);
    this.state = {
      localTime: moment().format("M月D日  星期dd HH:mm"),
    };
  }
  componentDidMount() {
    setInterval(() => {
      this.setState({
        localTime: moment().format("M月D日  星期dd  HH:mm"),
      });
    }, 1000);
  }
  render() {
    let { localTime } = this.state;
    let { windowWidth } = this.props;

    return (
      <div>
        <div className={windowWidth ? styles.system_name : styles.system_name_}>
          <p>穿跨越智能视频分析系统</p>
        </div>
        <div className={windowWidth ? styles.moment : styles.moment_}>
          <font>{localTime}</font>
        </div>
        <div className={styles.weather_style}></div>
        {/* <span onClick={() => this.props.Weather()}>asd</span> */}
      </div>
    );
  }
}

export default index;
